import request from '@/utils/request'

// 查询作物事件记录列表
export function listEvent(query) {
  return request({
    url: '/ncpsy/event/list',
    method: 'get',
    params: query
  })
}

// 查询作物事件记录详细
export function getEvent(cropEventId) {
  return request({
    url: '/ncpsy/event/' + cropEventId,
    method: 'get'
  })
}

// 新增作物事件记录
export function addEvent(data) {
  return request({
    url: '/ncpsy/event',
    method: 'post',
    data: data
  })
}

// 修改作物事件记录
export function updateEvent(data) {
  return request({
    url: '/ncpsy/event',
    method: 'put',
    data: data
  })
}

// 删除作物事件记录
export function delEvent(cropEventId) {
  return request({
    url: '/ncpsy/event/' + cropEventId,
    method: 'delete'
  })
}
